package test.java.com.project;

import java.util.Arrays;

public class MaoPao {
    public static void main(String[] args){
        int[] nums=new int[]{78,25,90,66,43,10,45};
       for(int g=0;g<nums.length;g++){
           boolean flag=false;
           for(int i=0;i<nums.length-g-1;i++){
               if(nums[i]>nums[i+1]){
                   int temp=nums[i];
                   nums[i]=nums[i+1];
                   nums[i+1]=temp;
                   flag=true;
               }
           }
           if(flag==false){
               break;
           }
       }

        System.out.println(Arrays.toString(nums));
    }
}
